//
// Created by xili on 2024/8/27 21:25.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int fillCups(vector<int>& amount) {
        sort(amount.begin(),amount.end());
        if(amount[0]+amount[1]<=amount[2])return amount[2];
        return amount[2]+(amount[0]+amount[1]+1-amount[2])/2;
    }
};